home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
mc302emb.zip
/
LIBCF
/
STRING2.ASM
< prev
next >
Wrap
Assembly Source File
|
1994-03-18
|
262b
|
12 lines
*
* Determine length of string: strlen(string)
*
strlen LDI 2,S ; Get string ptr
?1 LDB I ; Get byte from string
JZ ?2 ; We are at end
LEAI 1,I ; Skip to next
SJMP ?1 ; And proceed
?2 TIA ; Get pointer
SUB 2,S ; Compute actual length
RET